<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <p>父：</p>
        <span>{{money}}</span>
        <p>子：</p>
        <child :tochild='money'></child>
    </div>
    <template id="child">
        <div>
            <button>按钮</button>
            <span>{{tochild.car}}</span>
            <span>{{tochild.house}}</span>
        </div>
    </template>
    <script src="../vue.js"></script>
    <script>
        let tem={
            template:'#child',
            props: ['tochild'],
        }
        new Vue({
            el:'#app',
            data () {
                return {
                    money:{
                        car:1,
                        house:3,
                    }
                }
            },
            components: {
                tem:child,
            }
        })
    </script>
</body>
</html>